package flowlight.service;

import flowlight.dao.UserDao;
import flowlight.entity.User;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

@Service("UserService")
public class UserService {

    @Resource(name = "flowlightUserDao")
    private UserDao dao;
    public User findById(Integer userId){
        return dao.findById(userId);
    }

    public User findByPhone(String phone) {
        return dao.findByPhone(phone);
    }

    public void insert(User user) {
        dao.insertUser(user);
    }
}
